/*************************************************************************************
**																					**
**	atprocessor.h		Si1000 processor (8051 derivative							**
** 																					**
**************************************************************************************
**																					**
** Written By:	Steve Montgomery													**
**				Digital Six Laboratories LLC										**
** (c)2012,2013,2014 Digital Six Labs, All rights reserved							**
**																					**
**************************************************************************************/
//
// Revision History
//
// Revision		Date	Revisor		Description
// ===================================================================================
// ===================================================================================
/*! \addtogroup Utilities AT Command Processor
 *
 * \ingroup AtProcessor
 * @{
 * \details AT command processor
 *
 */
#ifndef AT_H
#define AT_H
/*! \details Enumerates the AT Command States
 */
typedef enum
{
	kDisabled,
	kPlus1,
	kPlus2,
	kPlus3,
	kEnabled
} tAtStates;

typedef void (*tCallback)(U8 callbackNumber);
typedef void(*tCommandCallback)();
typedef struct {
	U8 *command;
	tCommandCallback callback;
} tAtCommand;
void ATRegisterCommand(tAtCommand command);
void ATProcess();
void ATExitCommandMode();
void ATInitialize(tCommandCallback cb, tCommandCallback cb1, U8 consume);
U8 IsATBufferNotEmpty();
U8 GetATBufferCharacter();
tAtStates ATGetState();
U8 ATGetU16(U16 *val);
U8 ATGetU32(U32 *val);
U8 ATGetU8(U8 *val);
U8 ATGetU16FromStream(U16 *val,U8 *stream);
U8 ATGetU32FromStream(U32 *val,U8 *stream);
U8 ATGetU8FromStream(U8 *val,U8 *stream);
#endif
/*!
 * @}
 */
